package com.glela.live.service.impl;

import com.glela.live.mapper.LiveOrderMapper;
import com.glela.live.model.LiveOrder;
import com.glela.live.service.LiveOrderService;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LiveOrderServiceImpl implements LiveOrderService{

    @Autowired
    private LiveOrderMapper liveOrderMapper;

    @Override
    public int add(LiveOrder liveOrder) {
        return liveOrderMapper.add(liveOrder);
    }

    @Override
    public int getSizeByPid(int livePlanId) {
        return liveOrderMapper.getSizeByPid(livePlanId);
    }

    @Override
    public List<LiveOrder> getList(int livePlanId, int start, int size) {
        return liveOrderMapper.getList(livePlanId,start,size);
    }
    
    public List<LiveOrder> selectLiveOrderByOrderOrderObjectId(@Param("orderObjectId") Long orderObjectId){
    	return liveOrderMapper.selectLiveOrderByOrderSn(orderObjectId);
    }
}
